//课堂练习
public class BankAccount {
    private int id;//账号
    private String password;
    private double deposit,minremain;
    private static float interestRate;
    private static int init = 1;//初始化值，用于自动生成id号并实现自增效果
    BankAccount(){}
    BankAccount(String password, double deposit) {
        this.id = init++;
        this.password = password;
        this.deposit = deposit;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public double getDeposit() {
        return deposit;
    }

    public void setDeposit(double deposit) {
        this.deposit = deposit;
    }

    public double getMinremain() {
        return minremain;
    }

    public void setMinremain(double minremain) {
        this.minremain = minremain;
    }

    public static float getInterestRate() {
        return interestRate;
    }

    public static void setInterestRate(float interestRate) {
        BankAccount.interestRate = interestRate;
    }
}